package app.mvp;

import android.util.Log;

import app.mvp.base.mvp.BaseMvpPresenter;

/**
 * Created by 刘智强 on 2017/4/6.
 */

public class MainPresenter extends BaseMvpPresenter<MainView> {
    private MainModel mainModel;
    MainView mainView;


    public MainPresenter(MainModel mainModel) {
        this.mainModel = mainModel;

    }

    @Override
    public void init() {
        checkViewAttach();
        mainView= getMvpView();
        this.mainModel.setContext(context);
    }

    @Override
    public void getDataFromCache() {

    }

    @Override
    public void getDataFromNet() {

    }

    public void updateData() {
        mainView.showLoading();
        mainView.setData(mainModel.setUser());
        Log.e("TAG","updateData");
        mainView.dismiss();

    }


}
